import { createApp } from 'vue'
// @ts-ignore
import App from './App.vue'
import router from './router'
import pinia from './stores'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'

const app = createApp(App)
app.use(pinia)
app.use(router)
app.use(ElementPlus, {
  locale: zhCn
})

// svg图标
import 'virtual:svg-icons-register'
// @ts-ignore
import SvgIcon from '@/components/SvgIcon'
app.component('svg-icon', SvgIcon)

//载入props编辑组件。
import editors from '@/components/editors/'
app.use(editors)

// main.ts
// 如果只想导入css变量
import 'element-plus/theme-chalk/dark/css-vars.css'

// system
import './assets/base.scss'

// // 小图标
import './assets/font/iconfont'
// // 主题
import 'element-plus/theme-chalk/src/dark/css-vars.scss'
// 上传插件
import uploader from 'vue-simple-uploader'
import 'vue-simple-uploader/dist/style.css'
//播放器
import VueVideoPlayer from '@videojs-player/vue'
import 'video.js/dist/video-js.css'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(uploader)
app.use(VueVideoPlayer)
app.mount('#app')
